package com.zhangc.blog.admin.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhangc.blog.admin.entity.ArticleEntity;
import com.zhangc.blog.admin.entity.BlogPwdEntity;
import com.zhangc.blog.admin.mapper.ArticleMapper;
import com.zhangc.blog.admin.mapper.BlogPwdMapper;

/**
 * 功能描述:<br>
 *
 * @author wx:fdzhangc
 * @see [相关类/方法]（可选）
 * @since [产品/模块版本] （可选）
 */
@Service
public class BlogPwdService {
    @Autowired
    BlogPwdMapper blogPwdMapper;

    public boolean add(BlogPwdEntity pwdEntity) {
        int res = blogPwdMapper.insertBlogPwd(pwdEntity);
        return res > 0;
    }

    public List<BlogPwdEntity> getBlogPwdList(String owner) {
        return blogPwdMapper.getBlogPwdList(owner);
    }

    public List<String> getAllBelongs() {
        return blogPwdMapper.getAllBelongs();
    }
}
